# 父镜像
FROM zhaotao/oracle-jdk8

WORKDIR /usr/tomcat

RUN     \
        tomcatDownloadUrl=http://mirrors.tuna.tsinghua.edu.cn/apache/tomcat/tomcat-9/v9.0.11/bin/apache-tomcat-9.0.11.tar.gz; \
        tomcatFileName=tomcat.tar.gz; \
        yum install -y wget; \
        wget -O $tomcatFileName $tomcatDownloadUrl; \
	tar -zxf $tomcatFileName --strip-components=1; \
	# 清理
	yum remove -y wget; \
	rm -rf $tomcatFileName

EXPOSE 8080

# 容器启动时执行
ENTRYPOINT /usr/tomcat/bin/catalina.sh run
